#ifndef RENDERFRAME_H
#define RENDERFRAME_H

#include <QFrame>

class RenderFrame : public QFrame
{
	Q_OBJECT

public:
	RenderFrame(QWidget *parent);
	~RenderFrame();
	void paintEvent(QPaintEvent * event) override;
	int nodeHeight();
	int nodeWidth();
	int worldHeight();
	int worldWidth();
	QPoint world2Node(const QPoint &pos);
	QPoint node2World(const QPoint &pos);
	double scale();
	void setScale(double s);
	void mousePressEvent(QMouseEvent * event) override;
private:
	const static int edgeSize = 20;
	void drawBackground();
	void drawAix();
	double _scale;
};

#endif // RENDERFRAME_H
